<?php


namespace app\api\controller;


use app\api\lists\GoodsCategoryLists;
use app\api\logic\GoodsCategoryLogic;

class GoodsCategoryController extends BaseShopController
{
    public array $notNeedLogin = ['lists','otherLists'];

    /**
     * @notes 服务分类列表
     * @return \think\response\Json
     * @author ljj
     * @date 2022/2/18 10:55 上午
     */
    public function lists()
    {
        return $this->dataLists(new GoodsCategoryLists());
    }

    /**
     * @notes 其它分类列表
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @author ljj
     * @date 2022/3/29 3:16 下午
     */
    public function otherLists()
    {
        $id = $this->request->get('id',0);
        $result = (new GoodsCategoryLogic)->otherLists($id);
        return $this->success('',$result);
    }
}